package com.ztesoft.ossup.report.domain;

import java.io.Serializable;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.SequenceGenerator;

@Entity
public class ReportChart implements Serializable {
	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;
	@Id
	@GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "REPORT_CHART_SEQ")
	@SequenceGenerator(name = "REPORT_CHART_SEQ", sequenceName = "REPORT_CHART_SEQ")
	public Long id;
	
	@ManyToOne(fetch = FetchType.EAGER)
    @JoinColumn(name = "reportId", referencedColumnName = "id")
    public Report report;

	@Column(nullable = false, length = 256)
	public String title = "";// 图表标题

	@Column(nullable = false, length = 256)
	public String titleForPie = "";// 饼图图表标题

	@Column(nullable = false, length = 256)
	public String subTitle = "";// 图表子标题

	@Column(nullable = false, length = 4)
	public Integer borderWidth = 1;

	@Column(nullable = false, length = 128)
	public String borderColor = "rgba(215,215,215,1)";

	@Column(nullable = false, length = 64)
	public String borderSkipped = "bottom";


	@Column(nullable = false, length = 256)
	public String xAxesTitle = "";// 横坐标标题

	@Column(nullable = false, length = 256)
	public String yAxesTitle = "";// 纵坐标标题
	
	@Column(nullable = false)
	@org.hibernate.annotations.Type(type="yes_no")
	private Boolean fill=false;

	@Column(nullable = false, length = 3)
	public String state;
	
	@Column(nullable = false, length = 512)
	public String xDataKeys;
	
	@Column(nullable = false, length = 512)
	public String yDataKeys;


	public String getxAxesTitle() {
		return xAxesTitle;
	}

	public void setxAxesTitle(String xAxesTitle) {
		this.xAxesTitle = xAxesTitle;
	}

	public String getyAxesTitle() {
		return yAxesTitle;
	}

	public void setyAxesTitle(String yAxesTitle) {
		this.yAxesTitle = yAxesTitle;
	}

	public String getTitle() {
		return title;
	}

	public void setTitle(String title) {
		this.title = title;
	}

	public String getSubTitle() {
		return subTitle;
	}

	public void setSubTitle(String subTitle) {
		this.subTitle = subTitle;
	}

	public boolean getFill() {
		return fill;
	}

	public void setFill(boolean fill) {
		this.fill = fill;
	}


	public Integer getBorderWidth() {
		return borderWidth;
	}

	public void setBorderWidth(Integer borderWidth) {
		this.borderWidth = borderWidth;
	}

	public String getBorderColor() {
		return borderColor;
	}

	public void setBorderColor(String borderColor) {
		this.borderColor = borderColor;
	}

	public String getBorderSkipped() {
		return borderSkipped;
	}

	public void setBorderSkipped(String borderSkipped) {
		this.borderSkipped = borderSkipped;
	}


	public String getTitleForPie() {
		return titleForPie;
	}

	public void setTitleForPie(String titleForPie) {
		this.titleForPie = titleForPie;
	}

	@Override
	public String toString() {
		return "Chart [id=" + id + ", title=" + title + ", titleForPie=" + titleForPie + ", subTitle=" + subTitle
				+ ", borderWidth=" + borderWidth + ", borderColor=" + borderColor + ", borderSkipped=" + borderSkipped
				+ ", xAxesTitle=" + xAxesTitle + ", yAxesTitle=" + yAxesTitle + ", fill=" + fill + ", state=" + state
				+ "]";
	}

	public Long getId() {
		return id;
	}

	public void setId(Long id) {
		this.id = id;
	}

	public Report getReport() {
		return report;
	}

	public void setReport(Report report) {
		this.report = report;
	}

	public String getState() {
		return state;
	}

	public void setState(String state) {
		this.state = state;
	}

	public String getxDataKeys() {
		return xDataKeys;
	}

	public void setxDataKeys(String xDataKeys) {
		this.xDataKeys = xDataKeys;
	}

	public String getyDataKeys() {
		return yDataKeys;
	}

	public void setyDataKeys(String yDataKeys) {
		this.yDataKeys = yDataKeys;
	}

	public void setFill(Boolean fill) {
		this.fill = fill;
	}
	
	


}
